Modding:Item Overview
Introduction Items are a fundamental aspect of the game and maybe one of the most simple elements to add by modding. There is hardly anything that cannot be achieved with items, they can be used for many things such as rewarding the player, allowing unique gameplay options or even to spawn characters. Generally, most items can be separated in 3 categories: #'Sanity items '''can be consumed to increase the sanity of their trek members. Without these items an expedition is usually doomed to fail. Examples are Chocolate , Whisky or Coca Leaves. #'Utility items usually allow players to develop some kind of special strategy. They are sometimes automatically consumed like the Machete to reduce movement costs when traveling through thick jungles. Others can be clicked to trigger an effect like the Shovel or First Aid Kit. Some even spawn locations, such as the Camp Site. #'Treasure items '''usually serve no other purpose than awarding fame or funds when returning home after an expedition. Typically the most valuable ones require the player to loot Shrines , such as the Golden Skull. Others, like the Elephant Tusk can be found in special locations, or looted from killed enemies, like the Crocodile Skin. Of course there are many more items that do not fit these basic categories. Some of the more interesting items are Tome Pages, recharging items like the Crystal Ball, the infamous Necronomicon, the Temple Pendulum or the Mysterious Egg. We would like to encourage you to look at the way we set up all of our items and then break and bend our rules and create new and exciting items that only you could have come up with. A special case of items are metaItems , which are not described in this section. Basic Structure An basic item definition looks like this: { id: it-idOfYourItem name: txt-it-nameOfYourItem description: txt-it-nameOfYourItem debugCategory: trophy sprite: it_itemSprite.png value: { base: 40, trader: 60, } maxStack: 5 fame: fameLarge funds: fundsLarge } Value Value defines the value of the item when bartering during expeditions, and is independent from the amount of funds or fame the player will be rewarded for the item when returning home after an expedition. A basic value definition can be: value = 10 However, the value of items can be more interesting if an item is more valuable in a specific barter. For example, whisky is much more valuable when bartering at a mission compared to a trader . In order to achieve this, additional priceTables can be used to define different values for an item. For example, the value of it-whisky looks like this: value: { base: 10 mission: 35 polarStation: 30 village: 20 karma: 5 } As you can see, depending on where whisky is offered during a barter, the value will change drastically. This makes whisky much more interesting and strategically relevant as a resource for bartering, and can also add character to the bartering party (those whisky loving priests). Every barter that does not have a priceTable defined uses the base value. Karma is a special value that is only used when sacrificing the object at an altar. Here, the karma value defines how quickly the karma of the altar is filled to trigger the altar effect. resellFactor An additional option to influence the value of an item is to tune the resellFactor, which will be multiplied by the value of the item when players are offering the item in a barter dialogue. For example, this allows items to be expensive when trying to obtain them, but be worthless when trying to offer them during a barter. Tuning To tune the actual gameplay impacts and balance the strategic value of an item you can adjust several aspects: Item Lists Item lists define a pool of items that will potentially be spawned in various contexts such as looting or bartering. If you want your created item to be spawned in a village barter or at the harbor shop, you will need to use targetId to hook up your item into the respective item list. All standard item lists can be found in items.conf.js. This is how a tyical item list looks like: { id: "il-loot-edible", items: [ {slots: 1, "it-mango":5} {slots: 1, "it-redBerries":5} {slots: 1, "it-whisky":2} {slots: 1, "it-chocolate":4} {slots: 1, "it-cocaLeaves":4} {slots: 1, "it-tinCans":6} ] } So whenever il-loot-edible is called, it has the same chance to spawn 5 Mangos , 5 Red Berries , 2 Whisky , 4 Chocolate and so on. It is important to note that item lists can contain item lists. For example, all Mushrooms are grouped into one list, which is itself added into il-trade-shamanHut , the item list of the Shaman Hut . Advanced Options Events It is possible to use events within the definition of an item. This will make the item clickable by the player, which in turn will trigger the effects defined within the event. These effects can be very simple like adding some sanity and removing the item like in the case of ''it-chocolate', or can lead to further, complex event sequences like in'' it-necronomicon''. Example it-chocolate: events: { sanity:+10 removeItem: true playSound: "sfx_eat_var2" chat: "cl-item-chocolate" } dayEvents & tripEvents Unlike events, dayEvents or tripEvents are triggered automatically every time players are moving from one position to another. A dayEvents is triggered for every tile the trek is passing through, while a tripEvents is triggered only once, independent of how many tiles are crossed during movement. These two events allow far many interesting effects. Example dayEvents of it-mango , which removes one mango when moving across a tile with a chance of 1 to 7: dayEvents: [ {"slots": 7} {"slots": 1, "removeItem": true} ] Example tripEvents of it-baby-tortoise , which will trigger the event evt-tortoise-adult with a chance of 1 to 5: tripEvents: [ {"slots": 1, "delayedEvent" : "evt-tortoise-adult"} {"slots": 5} ] While both events are very similar, it is important to understand that dayEvents are much more often triggered than tripEvents, which are heavily depending on the movement behavior of players (long vs. short trips). Losable When setting '''losable = false an item cannot be lost when dropItems is triggered by an event. Items are losable=true by default. autoRemove When setting autoRemove = true '''an item will automatically be removed at the end of the current expedition (or the next, if not obtained during an expedition). Examples for this is the Mangos or Treasure Map item. maxChargeTime By setting a maxChargeTime you can create an item that can be used only in certain intervals. Typcially this comes with an event definition that allows the item to be clicked, triggering the effect of the event. Once clicked, a large number will appear on top of the icon, counting down the maxChargeTime (in game days) before it can be clicked again. Example items are the Drums or Crystal Ball. reqWorld & reqDifficulty When setting reqWorld or reqDifficulty you can specify at which expedition or difficulty setting the item will be spawned or not spawned at all. So a setting of '''reqWorld: '..2' will only allow the item to be spawned on Expedition 1, 2 or 3 (counting starts, of course, at 0). Difficulty settings are easy = 0, medium = 1, hard = 2. addStatus You can specify statuses here that will be applied to the explorer character as long as the item is in the inventory (does not stack) Art Creating the art for an item is one of the most simple art related tasks of modding, as you'll need to create only one image. You will need to consider the following aspects: #'Maximum image size' is 20 x 20 pixels. You can use the template file template_item.png. #'Overlapping regions' will be numbers for the amount of items in a stack on the bottom right. Also, top left and right will be covered slightly if weightless or fame / funds is used. #'Readability on the background' will improve if you make sure your image works well on the color #342a22 Category:Modding Category:Modding-Overview